package net.freestu.sola.web.global;

import java.util.HashMap;
import java.util.Map;

import net.freestu.sola.web.spider.ballerina.myUtil.UrlQueue;

public class AllUrlQueues {
	
	private Map themap;
	private static AllUrlQueues singleton;
	
	
	private AllUrlQueues(){
		
		themap=new HashMap();
	}
	
	synchronized public static AllUrlQueues getInstance(){
		
		
		 if(singleton==null){
			  
			  singleton=new AllUrlQueues();
		  }
		  
		  return singleton;
	}
	
	synchronized public void put(String name){
		
		UrlQueue pc=new UrlQueue(name);
		themap.put(name,pc);
	}
	
	synchronized public UrlQueue get(String name){
		
		return (UrlQueue)themap.get(name);
	}
	

}
